Skip to content

Conversation

@remi-filament
Copy link
Contributor

No description provided.

@legalsylvain
Copy link
Contributor

legalsylvain commented Dec 31, 2024

/ocabot migration hr_holidays

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Dec 31, 2024
@remi-filament
Copy link
Contributor Author

Done as per your comments, thanks for your review @Murtaza-SerpentCS

Copy link
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remi-filament could you please rebase the branch?

@remi-filament
Copy link
Contributor Author

@carlos-lopez-tecnativa @MiquelRForgeFlow thanks for your review, rebase done and apriori updated.

Copy link
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and working, but I think we need to adjust some SQL to maintain the current behavior in V16. Please let me know if you have any doubts.
TT49870
cc: @pedrobaeza

@carlos-lopez-tecnativa
Copy link
Contributor

ping @remi-filament

@remi-filament remi-filament force-pushed the 17.0-hr_holidays branch 2 times, most recently from f1607c3 to 3987e05 Compare March 11, 2025 14:32
@remi-filament
Copy link
Contributor Author

Thanks @carlos-lopez-tecnativa and @MiquelRForgeFlow I implemented the changes as per your review !

Copy link
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor change, and I think it's ready to merge.

Copy link
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 64 to 65
hr_holidays / hr.leave.accrual.plan / active (boolean) : NEW hasdefault: default
# NOTHING TO DO: new field, default = active
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, do like _pre_create_account_report_active in pre-migration of account.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, what is the rationale to create columns in SQL instead of letting Odoo do it, is it so much performance gain ?
Should we do this for all new fields with default value ? (there are lots of them on hr.leave.accrual.plan : accrued_gain_time, added_value_type, carryover_date, carryover_day, carryover_month).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My logic is that if a model is transactional (with many records, such as account.move, account.move.line, stock.move, stock.move.line, sale.order, sale.order.line, etc.), it should be handled using SQL instead of the ORM. However, if the model is a master record (with only a few records, typically settings), then using the ORM is sufficient.

It would be great to hear the logic from others, such as @pedrobaeza @MiquelRForgeFlow, to take different perspectives into account.

@MiquelRForgeFlow
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 17.0-ocabot-merge-pr-4702-by-MiquelRForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 9b26ece. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot OCA-git-bot merged commit 9b26ece into OCA:17.0 Mar 13, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants